package com.yangrui.app.entity;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.util.Date;
import java.util.List;

@Data
@NoArgsConstructor
@AllArgsConstructor
@JsonIgnoreProperties(value = {"handler"})
public class Video {

    public Video(Integer id, String title){
        this.id = id;
        this.title = title;
    }

    private Integer id;

    private String title;

    private String summary;

    @JsonProperty("cover-img")
    private String coverImg;

    private  Double price;

    private Double point;

    @JsonProperty("create-time")
    private Date createTime;

    private List<Chapter> chapters;
}
